DECLARE @rPhysicalCPUQty INT,
		@rLogicCPUQty INT,
		@rCoresQty INT,
		@rPhysicalMemorySize MONEY,
		@rUnusedPhysicalMemory MONEY,
		@rUsedPhysicalMemory MONEY,
		@rSystemCacheSize MONEY,
		@rxDiskCapacity NVARCHAR(MAX),
		@rSystemInfo NVARCHAR(MAX),
		@rLanaguage NVARCHAR(MAX)

SELECT	@rLogicCPUQty = s.cpu_count,
		-- hyperthread_ratio AS [Hyperthread Ratio], 
		@rPhysicalCPUQty = s.cpu_count/s.hyperthread_ratio
FROM sys.dm_os_sys_info s OPTION (RECOMPILE)






SELECT	@rPhysicalMemorySize = CEILING(total_physical_memory_kb * 1.0 / 1024 / 1024),
		@rUnusedPhysicalMemory = CAST(available_physical_memory_kb * 1.0 / 1024 / 1024 AS DECIMAL(8, 4)),
		@rUsedPhysicalMemory = CAST(( total_physical_memory_kb - available_physical_memory_kb ) * 1.0 / 1024 / 1024 AS DECIMAL(8, 4)),
		@rSystemCacheSize = CAST(system_cache_kb*1.0 / 1024/1024 AS DECIMAL(8, 4))
FROM sys.dm_os_sys_memory


SELECT 
		@rLanaguage = CONVERT(NVARCHAR(max), SERVERPROPERTY('Collation')),		-- AS Collation,
		@rxDiskCapacity = CONVERT(NVARCHAR(max), SERVERPROPERTY('Edition')),	-- AS Edition,
		@rSystemInfo = CONVERT(NVARCHAR(max), SERVERPROPERTY('ProductVersion'))	-- AS ProductVersion




SELECT
		@rPhysicalCPUQty AS PhysicalCPUQty,
		@rLogicCPUQty AS xLogicCPUQty,
		@rCoresQty AS xCoresQty,
		@rPhysicalMemorySize AS xPhysicalMemorySize,
		@rUnusedPhysicalMemory AS xUnusedPhysicalMemory,
		@rUsedPhysicalMemory AS xUsedPhysicalMemory,
		@rSystemCacheSize AS xSystemCacheSize,
		@rxDiskCapacity AS xDiskCapacity,
		@rSystemInfo AS xSystemInfo,
		@rLanaguage AS xLanaguage